// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
// the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
// an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
// specific language governing permissions and limitations under the License.

//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by google-apis-code-generator 1.5.1
//     C# generator version: 1.22.0
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

/**
 * \brief
 *   Firebase Rules API Version v1
 *
 * \section ApiInfo API Version Information
 *    <table>
 *      <tr><th>API
 *          <td><a href='https://firebase.google.com/docs/storage/security'>Firebase Rules API</a>
 *      <tr><th>API Version<td>v1
 *      <tr><th>API Rev<td>20170314 (803)
 *      <tr><th>API Docs
 *          <td><a href='https://firebase.google.com/docs/storage/security'>
 *              https://firebase.google.com/docs/storage/security</a>
 *      <tr><th>Discovery Name<td>firebaserules
 *    </table>
 *
 * \section ForMoreInfo For More Information
 *
 * The complete API documentation for using Firebase Rules API can be found at
 * <a href='https://firebase.google.com/docs/storage/security'>https://firebase.google.com/docs/storage/security</a>.
 *
 * For more information about the Google APIs Client Library for .NET, see
 * <a href='https://developers.google.com/api-client-library/dotnet/get_started'>
 * https://developers.google.com/api-client-library/dotnet/get_started</a>
 */

namespace Google.Apis.FirebaseRules.v1
{
    /// <summary>The FirebaseRules Service.</summary>
    public class FirebaseRulesService : Google.Apis.Services.BaseClientService
    {
        /// <summary>The API version.</summary>
        public const string Version = "v1";

        /// <summary>The discovery version used to generate this service.</summary>
        public static Google.Apis.Discovery.DiscoveryVersion DiscoveryVersionUsed =
            Google.Apis.Discovery.DiscoveryVersion.Version_1_0;

        /// <summary>Constructs a new service.</summary>
        public FirebaseRulesService() :
            this(new Google.Apis.Services.BaseClientService.Initializer()) {}

        /// <summary>Constructs a new service.</summary>
        /// <param name="initializer">The service initializer.</param>
        public FirebaseRulesService(Google.Apis.Services.BaseClientService.Initializer initializer)
            : base(initializer)
        {
            projects = new ProjectsResource(this);
        }

        /// <summary>Gets the service supported features.</summary>
        public override System.Collections.Generic.IList<string> Features
        {
            get { return new string[0]; }
        }

        /// <summary>Gets the service name.</summary>
        public override string Name
        {
            get { return "firebaserules"; }
        }

        /// <summary>Gets the service base URI.</summary>
        public override string BaseUri
        {
            get { return "https://firebaserules.googleapis.com/"; }
        }

        /// <summary>Gets the service base path.</summary>
        public override string BasePath
        {
            get { return ""; }
        }

        /// <summary>Available OAuth 2.0 scopes for use with the Firebase Rules API.</summary>
        public class Scope
        {
            /// <summary>View and manage your data across Google Cloud Platform services</summary>
            public static string CloudPlatform = "https://www.googleapis.com/auth/cloud-platform";

            /// <summary>View and administer all your Firebase data and settings</summary>
            public static string Firebase = "https://www.googleapis.com/auth/firebase";

            /// <summary>View all your Firebase data and settings</summary>
            public static string FirebaseReadonly = "https://www.googleapis.com/auth/firebase.readonly";

        }



        private readonly ProjectsResource projects;

        /// <summary>Gets the Projects resource.</summary>
        public virtual ProjectsResource Projects
        {
            get { return projects; }
        }
    }

    ///<summary>A base abstract class for FirebaseRules requests.</summary>
    public abstract class FirebaseRulesBaseServiceRequest<TResponse> : Google.Apis.Requests.ClientServiceRequest<TResponse>
    {
        ///<summary>Constructs a new FirebaseRulesBaseServiceRequest instance.</summary>
        protected FirebaseRulesBaseServiceRequest(Google.Apis.Services.IClientService service)
            : base(service)
        {
        }

        /// <summary>V1 error format.</summary>
        [Google.Apis.Util.RequestParameterAttribute("$.xgafv", Google.Apis.Util.RequestParameterType.Query)]
        public virtual System.Nullable<XgafvEnum> Xgafv { get; set; }

        /// <summary>V1 error format.</summary>
        public enum XgafvEnum
        {
            /// <summary>v1 error format</summary>
            [Google.Apis.Util.StringValueAttribute("1")]
            Value1,
            /// <summary>v2 error format</summary>
            [Google.Apis.Util.StringValueAttribute("2")]
            Value2,
        }

        /// <summary>OAuth access token.</summary>
        [Google.Apis.Util.RequestParameterAttribute("access_token", Google.Apis.Util.RequestParameterType.Query)]
        public virtual string AccessToken { get; set; }

        /// <summary>Data format for response.</summary>
        /// [default: json]
        [Google.Apis.Util.RequestParameterAttribute("alt", Google.Apis.Util.RequestParameterType.Query)]
        public virtual System.Nullable<AltEnum> Alt { get; set; }

        /// <summary>Data format for response.</summary>
        public enum AltEnum
        {
            /// <summary>Responses with Content-Type of application/json</summary>
            [Google.Apis.Util.StringValueAttribute("json")]
            Json,
            /// <summary>Media download with context-dependent Content-Type</summary>
            [Google.Apis.Util.StringValueAttribute("media")]
            Media,
            /// <summary>Responses with Content-Type of application/x-protobuf</summary>
            [Google.Apis.Util.StringValueAttribute("proto")]
            Proto,
        }

        /// <summary>OAuth bearer token.</summary>
        [Google.Apis.Util.RequestParameterAttribute("bearer_token", Google.Apis.Util.RequestParameterType.Query)]
        public virtual string BearerToken { get; set; }

        /// <summary>JSONP</summary>
        [Google.Apis.Util.RequestParameterAttribute("callback", Google.Apis.Util.RequestParameterType.Query)]
        public virtual string Callback { get; set; }

        /// <summary>Selector specifying which fields to include in a partial response.</summary>
        [Google.Apis.Util.RequestParameterAttribute("fields", Google.Apis.Util.RequestParameterType.Query)]
        public virtual string Fields { get; set; }

        /// <summary>API key. Your API key identifies your project and provides you with API access, quota, and reports.
        /// Required unless you provide an OAuth 2.0 token.</summary>
        [Google.Apis.Util.RequestParameterAttribute("key", Google.Apis.Util.RequestParameterType.Query)]
        public virtual string Key { get; set; }

        /// <summary>OAuth 2.0 token for the current user.</summary>
        [Google.Apis.Util.RequestParameterAttribute("oauth_token", Google.Apis.Util.RequestParameterType.Query)]
        public virtual string OauthToken { get; set; }

        /// <summary>Pretty-print response.</summary>
        /// [default: true]
        [Google.Apis.Util.RequestParameterAttribute("pp", Google.Apis.Util.RequestParameterType.Query)]
        public virtual System.Nullable<bool> Pp { get; set; }

        /// <summary>Returns response with indentations and line breaks.</summary>
        /// [default: true]
        [Google.Apis.Util.RequestParameterAttribute("prettyPrint", Google.Apis.Util.RequestParameterType.Query)]
        public virtual System.Nullable<bool> PrettyPrint { get; set; }

        /// <summary>Available to use for quota purposes for server-side applications. Can be any arbitrary string
        /// assigned to a user, but should not exceed 40 characters.</summary>
        [Google.Apis.Util.RequestParameterAttribute("quotaUser", Google.Apis.Util.RequestParameterType.Query)]
        public virtual string QuotaUser { get; set; }

        /// <summary>Legacy upload protocol for media (e.g. "media", "multipart").</summary>
        [Google.Apis.Util.RequestParameterAttribute("uploadType", Google.Apis.Util.RequestParameterType.Query)]
        public virtual string UploadType { get; set; }

        /// <summary>Upload protocol for media (e.g. "raw", "multipart").</summary>
        [Google.Apis.Util.RequestParameterAttribute("upload_protocol", Google.Apis.Util.RequestParameterType.Query)]
        public virtual string UploadProtocol { get; set; }

        /// <summary>Initializes FirebaseRules parameter list.</summary>
        protected override void InitParameters()
        {
            base.InitParameters();

            RequestParameters.Add(
                "$.xgafv", new Google.Apis.Discovery.Parameter
                {
                    Name = "$.xgafv",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
            RequestParameters.Add(
                "access_token", new Google.Apis.Discovery.Parameter
                {
                    Name = "access_token",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
            RequestParameters.Add(
                "alt", new Google.Apis.Discovery.Parameter
                {
                    Name = "alt",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = "json",
                    Pattern = null,
                });
            RequestParameters.Add(
                "bearer_token", new Google.Apis.Discovery.Parameter
                {
                    Name = "bearer_token",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
            RequestParameters.Add(
                "callback", new Google.Apis.Discovery.Parameter
                {
                    Name = "callback",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
            RequestParameters.Add(
                "fields", new Google.Apis.Discovery.Parameter
                {
                    Name = "fields",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
            RequestParameters.Add(
                "key", new Google.Apis.Discovery.Parameter
                {
                    Name = "key",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
            RequestParameters.Add(
                "oauth_token", new Google.Apis.Discovery.Parameter
                {
                    Name = "oauth_token",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
            RequestParameters.Add(
                "pp", new Google.Apis.Discovery.Parameter
                {
                    Name = "pp",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = "true",
                    Pattern = null,
                });
            RequestParameters.Add(
                "prettyPrint", new Google.Apis.Discovery.Parameter
                {
                    Name = "prettyPrint",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = "true",
                    Pattern = null,
                });
            RequestParameters.Add(
                "quotaUser", new Google.Apis.Discovery.Parameter
                {
                    Name = "quotaUser",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
            RequestParameters.Add(
                "uploadType", new Google.Apis.Discovery.Parameter
                {
                    Name = "uploadType",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
            RequestParameters.Add(
                "upload_protocol", new Google.Apis.Discovery.Parameter
                {
                    Name = "upload_protocol",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
        }
    }

    /// <summary>The "projects" collection of methods.</summary>
    public class ProjectsResource
    {
        private const string Resource = "projects";

        /// <summary>The service which this resource belongs to.</summary>
        private readonly Google.Apis.Services.IClientService service;

        /// <summary>Constructs a new resource.</summary>
        public ProjectsResource(Google.Apis.Services.IClientService service)
        {
            this.service = service;
            releases = new ReleasesResource(service);
            rulesets = new RulesetsResource(service);

        }

        private readonly ReleasesResource releases;

        /// <summary>Gets the Releases resource.</summary>
        public virtual ReleasesResource Releases
        {
            get { return releases; }
        }

        /// <summary>The "releases" collection of methods.</summary>
        public class ReleasesResource
        {
            private const string Resource = "releases";

            /// <summary>The service which this resource belongs to.</summary>
            private readonly Google.Apis.Services.IClientService service;

            /// <summary>Constructs a new resource.</summary>
            public ReleasesResource(Google.Apis.Services.IClientService service)
            {
                this.service = service;

            }


            /// <summary>Create a `Release`.
            ///
            /// Release names should reflect the developer's deployment practices. For example, the release name may
            /// include the environment name, application name, application version, or any other name meaningful to the
            /// developer. Once a `Release` refers to a `Ruleset`, the rules can be enforced by Firebase Rules-enabled
            /// services.
            ///
            /// More than one `Release` may be 'live' concurrently. Consider the following three `Release` names for
            /// `projects/foo` and the `Ruleset` to which they refer.
            ///
            /// Release Name                    | Ruleset Name --------------------------------|-------------
            /// projects/foo/releases/prod      | projects/foo/rulesets/uuid123 projects/foo/releases/prod/beta |
            /// projects/foo/rulesets/uuid123 projects/foo/releases/prod/v23  | projects/foo/rulesets/uuid456
            ///
            /// The table reflects the `Ruleset` rollout in progress. The `prod` and `prod/beta` releases refer to the
            /// same `Ruleset`. However, `prod/v23` refers to a new `Ruleset`. The `Ruleset` reference for a `Release`
            /// may be updated using the UpdateRelease method.</summary>
            /// <param name="body">The body of the request.</param>
            /// <param name="name">Resource name for the project which owns this `Release`.
            ///
            /// Format: `projects/{project_id}`</param>
            public virtual CreateRequest Create(Google.Apis.FirebaseRules.v1.Data.Release body, string name)
            {
                return new CreateRequest(service, body, name);
            }

            /// <summary>Create a `Release`.
            ///
            /// Release names should reflect the developer's deployment practices. For example, the release name may
            /// include the environment name, application name, application version, or any other name meaningful to the
            /// developer. Once a `Release` refers to a `Ruleset`, the rules can be enforced by Firebase Rules-enabled
            /// services.
            ///
            /// More than one `Release` may be 'live' concurrently. Consider the following three `Release` names for
            /// `projects/foo` and the `Ruleset` to which they refer.
            ///
            /// Release Name                    | Ruleset Name --------------------------------|-------------
            /// projects/foo/releases/prod      | projects/foo/rulesets/uuid123 projects/foo/releases/prod/beta |
            /// projects/foo/rulesets/uuid123 projects/foo/releases/prod/v23  | projects/foo/rulesets/uuid456
            ///
            /// The table reflects the `Ruleset` rollout in progress. The `prod` and `prod/beta` releases refer to the
            /// same `Ruleset`. However, `prod/v23` refers to a new `Ruleset`. The `Ruleset` reference for a `Release`
            /// may be updated using the UpdateRelease method.</summary>
            public class CreateRequest : FirebaseRulesBaseServiceRequest<Google.Apis.FirebaseRules.v1.Data.Release>
            {
                /// <summary>Constructs a new Create request.</summary>
                public CreateRequest(Google.Apis.Services.IClientService service, Google.Apis.FirebaseRules.v1.Data.Release body, string name)
                    : base(service)
                {
                    Name = name;
                    Body = body;
                    InitParameters();
                }


                /// <summary>Resource name for the project which owns this `Release`.
                ///
                /// Format: `projects/{project_id}`</summary>
                [Google.Apis.Util.RequestParameterAttribute("name", Google.Apis.Util.RequestParameterType.Path)]
                public virtual string Name { get; private set; }


                /// <summary>Gets or sets the body of this request.</summary>
                Google.Apis.FirebaseRules.v1.Data.Release Body { get; set; }

                ///<summary>Returns the body of the request.</summary>
                protected override object GetBody() { return Body; }

                ///<summary>Gets the method name.</summary>
                public override string MethodName
                {
                    get { return "create"; }
                }

                ///<summary>Gets the HTTP method.</summary>
                public override string HttpMethod
                {
                    get { return "POST"; }
                }

                ///<summary>Gets the REST path.</summary>
                public override string RestPath
                {
                    get { return "v1/{+name}/releases"; }
                }

                /// <summary>Initializes Create parameter list.</summary>
                protected override void InitParameters()
                {
                    base.InitParameters();

                    RequestParameters.Add(
                        "name", new Google.Apis.Discovery.Parameter
                        {
                            Name = "name",
                            IsRequired = true,
                            ParameterType = "path",
                            DefaultValue = null,
                            Pattern = @"^projects/[^/]+$",
                        });
                }

            }

            /// <summary>Delete a `Release` by resource name.</summary>
            /// <param name="name">Resource name for the `Release` to delete.
            ///
            /// Format: `projects/{project_id}/releases/{release_id}`</param>
            public virtual DeleteRequest Delete(string name)
            {
                return new DeleteRequest(service, name);
            }

            /// <summary>Delete a `Release` by resource name.</summary>
            public class DeleteRequest : FirebaseRulesBaseServiceRequest<Google.Apis.FirebaseRules.v1.Data.Empty>
            {
                /// <summary>Constructs a new Delete request.</summary>
                public DeleteRequest(Google.Apis.Services.IClientService service, string name)
                    : base(service)
                {
                    Name = name;
                    InitParameters();
                }


                /// <summary>Resource name for the `Release` to delete.
                ///
                /// Format: `projects/{project_id}/releases/{release_id}`</summary>
                [Google.Apis.Util.RequestParameterAttribute("name", Google.Apis.Util.RequestParameterType.Path)]
                public virtual string Name { get; private set; }


                ///<summary>Gets the method name.</summary>
                public override string MethodName
                {
                    get { return "delete"; }
                }

                ///<summary>Gets the HTTP method.</summary>
                public override string HttpMethod
                {
                    get { return "DELETE"; }
                }

                ///<summary>Gets the REST path.</summary>
                public override string RestPath
                {
                    get { return "v1/{+name}"; }
                }

                /// <summary>Initializes Delete parameter list.</summary>
                protected override void InitParameters()
                {
                    base.InitParameters();

                    RequestParameters.Add(
                        "name", new Google.Apis.Discovery.Parameter
                        {
                            Name = "name",
                            IsRequired = true,
                            ParameterType = "path",
                            DefaultValue = null,
                            Pattern = @"^projects/[^/]+/releases/.+$",
                        });
                }

            }

            /// <summary>Get a `Release` by name.</summary>
            /// <param name="name">Resource name of the `Release`.
            ///
            /// Format: `projects/{project_id}/releases/{release_id}`</param>
            public virtual GetRequest Get(string name)
            {
                return new GetRequest(service, name);
            }

            /// <summary>Get a `Release` by name.</summary>
            public class GetRequest : FirebaseRulesBaseServiceRequest<Google.Apis.FirebaseRules.v1.Data.Release>
            {
                /// <summary>Constructs a new Get request.</summary>
                public GetRequest(Google.Apis.Services.IClientService service, string name)
                    : base(service)
                {
                    Name = name;
                    InitParameters();
                }


                /// <summary>Resource name of the `Release`.
                ///
                /// Format: `projects/{project_id}/releases/{release_id}`</summary>
                [Google.Apis.Util.RequestParameterAttribute("name", Google.Apis.Util.RequestParameterType.Path)]
                public virtual string Name { get; private set; }


                ///<summary>Gets the method name.</summary>
                public override string MethodName
                {
                    get { return "get"; }
                }

                ///<summary>Gets the HTTP method.</summary>
                public override string HttpMethod
                {
                    get { return "GET"; }
                }

                ///<summary>Gets the REST path.</summary>
                public override string RestPath
                {
                    get { return "v1/{+name}"; }
                }

                /// <summary>Initializes Get parameter list.</summary>
                protected override void InitParameters()
                {
                    base.InitParameters();

                    RequestParameters.Add(
                        "name", new Google.Apis.Discovery.Parameter
                        {
                            Name = "name",
                            IsRequired = true,
                            ParameterType = "path",
                            DefaultValue = null,
                            Pattern = @"^projects/[^/]+/releases/.+$",
                        });
                }

            }

            /// <summary>List the `Release` values for a project. This list may optionally be filtered by `Release`
            /// name, `Ruleset` name, `TestSuite` name, or any combination thereof.</summary>
            /// <param name="name">Resource name for the project.
            ///
            /// Format: `projects/{project_id}`</param>
            public virtual ListRequest List(string name)
            {
                return new ListRequest(service, name);
            }

            /// <summary>List the `Release` values for a project. This list may optionally be filtered by `Release`
            /// name, `Ruleset` name, `TestSuite` name, or any combination thereof.</summary>
            public class ListRequest : FirebaseRulesBaseServiceRequest<Google.Apis.FirebaseRules.v1.Data.ListReleasesResponse>
            {
                /// <summary>Constructs a new List request.</summary>
                public ListRequest(Google.Apis.Services.IClientService service, string name)
                    : base(service)
                {
                    Name = name;
                    InitParameters();
                }


                /// <summary>Resource name for the project.
                ///
                /// Format: `projects/{project_id}`</summary>
                [Google.Apis.Util.RequestParameterAttribute("name", Google.Apis.Util.RequestParameterType.Path)]
                public virtual string Name { get; private set; }

                /// <summary>`Release` filter. The list method supports filters with restrictions on the `Release.name`,
                /// `Release.ruleset_name`, and `Release.test_suite_name`.
                ///
                /// Example 1: A filter of 'name=prod*' might return `Release`s with names within 'projects/foo'
                /// prefixed with 'prod':
                ///
                /// Name                          | Ruleset Name ------------------------------|-------------
                /// projects/foo/releases/prod    | projects/foo/rulesets/uuid1234 projects/foo/releases/prod/v1 |
                /// projects/foo/rulesets/uuid1234 projects/foo/releases/prod/v2 | projects/foo/rulesets/uuid8888
                ///
                /// Example 2: A filter of `name=prod* ruleset_name=uuid1234` would return only `Release` instances for
                /// 'projects/foo' with names prefixed with 'prod' referring to the same `Ruleset` name of 'uuid1234':
                ///
                /// Name                          | Ruleset Name ------------------------------|-------------
                /// projects/foo/releases/prod    | projects/foo/rulesets/1234 projects/foo/releases/prod/v1 |
                /// projects/foo/rulesets/1234
                ///
                /// In the examples, the filter parameters refer to the search filters are relative to the project.
                /// Fully qualified prefixed may also be used. e.g.
                /// `test_suite_name=projects/foo/testsuites/uuid1`</summary>
                [Google.Apis.Util.RequestParameterAttribute("filter", Google.Apis.Util.RequestParameterType.Query)]
                public virtual string Filter { get; set; }

                /// <summary>Next page token for the next batch of `Release` instances.</summary>
                [Google.Apis.Util.RequestParameterAttribute("pageToken", Google.Apis.Util.RequestParameterType.Query)]
                public virtual string PageToken { get; set; }

                /// <summary>Page size to load. Maximum of 100. Defaults to 10. Note: `page_size` is just a hint and the
                /// service may choose to load fewer than `page_size` results due to the size of the output. To traverse
                /// all of the releases, the caller should iterate until the `page_token` on the response is
                /// empty.</summary>
                [Google.Apis.Util.RequestParameterAttribute("pageSize", Google.Apis.Util.RequestParameterType.Query)]
                public virtual System.Nullable<int> PageSize { get; set; }


                ///<summary>Gets the method name.</summary>
                public override string MethodName
                {
                    get { return "list"; }
                }

                ///<summary>Gets the HTTP method.</summary>
                public override string HttpMethod
                {
                    get { return "GET"; }
                }

                ///<summary>Gets the REST path.</summary>
                public override string RestPath
                {
                    get { return "v1/{+name}/releases"; }
                }

                /// <summary>Initializes List parameter list.</summary>
                protected override void InitParameters()
                {
                    base.InitParameters();

                    RequestParameters.Add(
                        "name", new Google.Apis.Discovery.Parameter
                        {
                            Name = "name",
                            IsRequired = true,
                            ParameterType = "path",
                            DefaultValue = null,
                            Pattern = @"^projects/[^/]+$",
                        });
                    RequestParameters.Add(
                        "filter", new Google.Apis.Discovery.Parameter
                        {
                            Name = "filter",
                            IsRequired = false,
                            ParameterType = "query",
                            DefaultValue = null,
                            Pattern = null,
                        });
                    RequestParameters.Add(
                        "pageToken", new Google.Apis.Discovery.Parameter
                        {
                            Name = "pageToken",
                            IsRequired = false,
                            ParameterType = "query",
                            DefaultValue = null,
                            Pattern = null,
                        });
                    RequestParameters.Add(
                        "pageSize", new Google.Apis.Discovery.Parameter
                        {
                            Name = "pageSize",
                            IsRequired = false,
                            ParameterType = "query",
                            DefaultValue = null,
                            Pattern = null,
                        });
                }

            }

            /// <summary>Update a `Release`.
            ///
            /// Only updates to the `ruleset_name` and `test_suite_name` fields will be honored. `Release` rename is not
            /// supported. To create a `Release` use the CreateRelease method.</summary>
            /// <param name="body">The body of the request.</param>
            /// <param name="name">Resource name for the `Release`.
            ///
            /// `Release` names may be structured `app1/prod/v2` or flat `app1_prod_v2` which affords developers a great deal of
            /// flexibility in mapping the name to the style that best fits their existing development practices. For example, a
            /// name could refer to an environment, an app, a version, or some combination of three.
            ///
            /// In the table below, for the project name `projects/foo`, the following relative release paths show how flat and
            /// structured names might be chosen to match a desired development / deployment strategy.
            ///
            /// Use Case     | Flat Name           | Structured Name -------------|---------------------|----------------
            /// Environments | releases/qa         | releases/qa Apps         | releases/app1_qa    | releases/app1/qa Versions
            /// | releases/app1_v2_qa | releases/app1/v2/qa
            ///
            /// The delimiter between the release name path elements can be almost anything and it should work equally well with the
            /// release name list filter, but in many ways the structured paths provide a clearer picture of the relationship
            /// between `Release` instances.
            ///
            /// Format: `projects/{project_id}/releases/{release_id}`</param>
            public virtual UpdateRequest Update(Google.Apis.FirebaseRules.v1.Data.Release body, string name)
            {
                return new UpdateRequest(service, body, name);
            }

            /// <summary>Update a `Release`.
            ///
            /// Only updates to the `ruleset_name` and `test_suite_name` fields will be honored. `Release` rename is not
            /// supported. To create a `Release` use the CreateRelease method.</summary>
            public class UpdateRequest : FirebaseRulesBaseServiceRequest<Google.Apis.FirebaseRules.v1.Data.Release>
            {
                /// <summary>Constructs a new Update request.</summary>
                public UpdateRequest(Google.Apis.Services.IClientService service, Google.Apis.FirebaseRules.v1.Data.Release body, string name)
                    : base(service)
                {
                    Name = name;
                    Body = body;
                    InitParameters();
                }


                /// <summary>Resource name for the `Release`.
                ///
                /// `Release` names may be structured `app1/prod/v2` or flat `app1_prod_v2` which affords developers a
                /// great deal of flexibility in mapping the name to the style that best fits their existing development
                /// practices. For example, a name could refer to an environment, an app, a version, or some combination
                /// of three.
                ///
                /// In the table below, for the project name `projects/foo`, the following relative release paths show
                /// how flat and structured names might be chosen to match a desired development / deployment strategy.
                ///
                /// Use Case     | Flat Name           | Structured Name
                /// -------------|---------------------|---------------- Environments | releases/qa         |
                /// releases/qa Apps         | releases/app1_qa    | releases/app1/qa Versions     | releases/app1_v2_qa
                /// | releases/app1/v2/qa
                ///
                /// The delimiter between the release name path elements can be almost anything and it should work
                /// equally well with the release name list filter, but in many ways the structured paths provide a
                /// clearer picture of the relationship between `Release` instances.
                ///
                /// Format: `projects/{project_id}/releases/{release_id}`</summary>
                [Google.Apis.Util.RequestParameterAttribute("name", Google.Apis.Util.RequestParameterType.Path)]
                public virtual string Name { get; private set; }


                /// <summary>Gets or sets the body of this request.</summary>
                Google.Apis.FirebaseRules.v1.Data.Release Body { get; set; }

                ///<summary>Returns the body of the request.</summary>
                protected override object GetBody() { return Body; }

                ///<summary>Gets the method name.</summary>
                public override string MethodName
                {
                    get { return "update"; }
                }

                ///<summary>Gets the HTTP method.</summary>
                public override string HttpMethod
                {
                    get { return "PUT"; }
                }

                ///<summary>Gets the REST path.</summary>
                public override string RestPath
                {
                    get { return "v1/{+name}"; }
                }

                /// <summary>Initializes Update parameter list.</summary>
                protected override void InitParameters()
                {
                    base.InitParameters();

                    RequestParameters.Add(
                        "name", new Google.Apis.Discovery.Parameter
                        {
                            Name = "name",
                            IsRequired = true,
                            ParameterType = "path",
                            DefaultValue = null,
                            Pattern = @"^projects/[^/]+/releases/.+$",
                        });
                }

            }
        }
        private readonly RulesetsResource rulesets;

        /// <summary>Gets the Rulesets resource.</summary>
        public virtual RulesetsResource Rulesets
        {
            get { return rulesets; }
        }

        /// <summary>The "rulesets" collection of methods.</summary>
        public class RulesetsResource
        {
            private const string Resource = "rulesets";

            /// <summary>The service which this resource belongs to.</summary>
            private readonly Google.Apis.Services.IClientService service;

            /// <summary>Constructs a new resource.</summary>
            public RulesetsResource(Google.Apis.Services.IClientService service)
            {
                this.service = service;

            }


            /// <summary>Create a `Ruleset` from `Source`.
            ///
            /// The `Ruleset` is given a unique generated name which is returned to the caller. `Source` containing
            /// syntactic or semantics errors will result in an error response indicating the first error encountered.
            /// For a detailed view of `Source` issues, use TestRuleset.</summary>
            /// <param name="body">The body of the request.</param>
            /// <param name="name">Resource name for Project which owns this `Ruleset`.
            ///
            /// Format: `projects/{project_id}`</param>
            public virtual CreateRequest Create(Google.Apis.FirebaseRules.v1.Data.Ruleset body, string name)
            {
                return new CreateRequest(service, body, name);
            }

            /// <summary>Create a `Ruleset` from `Source`.
            ///
            /// The `Ruleset` is given a unique generated name which is returned to the caller. `Source` containing
            /// syntactic or semantics errors will result in an error response indicating the first error encountered.
            /// For a detailed view of `Source` issues, use TestRuleset.</summary>
            public class CreateRequest : FirebaseRulesBaseServiceRequest<Google.Apis.FirebaseRules.v1.Data.Ruleset>
            {
                /// <summary>Constructs a new Create request.</summary>
                public CreateRequest(Google.Apis.Services.IClientService service, Google.Apis.FirebaseRules.v1.Data.Ruleset body, string name)
                    : base(service)
                {
                    Name = name;
                    Body = body;
                    InitParameters();
                }


                /// <summary>Resource name for Project which owns this `Ruleset`.
                ///
                /// Format: `projects/{project_id}`</summary>
                [Google.Apis.Util.RequestParameterAttribute("name", Google.Apis.Util.RequestParameterType.Path)]
                public virtual string Name { get; private set; }


                /// <summary>Gets or sets the body of this request.</summary>
                Google.Apis.FirebaseRules.v1.Data.Ruleset Body { get; set; }

                ///<summary>Returns the body of the request.</summary>
                protected override object GetBody() { return Body; }

                ///<summary>Gets the method name.</summary>
                public override string MethodName
                {
                    get { return "create"; }
                }

                ///<summary>Gets the HTTP method.</summary>
                public override string HttpMethod
                {
                    get { return "POST"; }
                }

                ///<summary>Gets the REST path.</summary>
                public override string RestPath
                {
                    get { return "v1/{+name}/rulesets"; }
                }

                /// <summary>Initializes Create parameter list.</summary>
                protected override void InitParameters()
                {
                    base.InitParameters();

                    RequestParameters.Add(
                        "name", new Google.Apis.Discovery.Parameter
                        {
                            Name = "name",
                            IsRequired = true,
                            ParameterType = "path",
                            DefaultValue = null,
                            Pattern = @"^projects/[^/]+$",
                        });
                }

            }

            /// <summary>Delete a `Ruleset` by resource name.
            ///
            /// If the `Ruleset` is referenced by a `Release` the operation will fail.</summary>
            /// <param name="name">Resource name for the ruleset to delete.
            ///
            /// Format: `projects/{project_id}/rulesets/{ruleset_id}`</param>
            public virtual DeleteRequest Delete(string name)
            {
                return new DeleteRequest(service, name);
            }

            /// <summary>Delete a `Ruleset` by resource name.
            ///
            /// If the `Ruleset` is referenced by a `Release` the operation will fail.</summary>
            public class DeleteRequest : FirebaseRulesBaseServiceRequest<Google.Apis.FirebaseRules.v1.Data.Empty>
            {
                /// <summary>Constructs a new Delete request.</summary>
                public DeleteRequest(Google.Apis.Services.IClientService service, string name)
                    : base(service)
                {
                    Name = name;
                    InitParameters();
                }


                /// <summary>Resource name for the ruleset to delete.
                ///
                /// Format: `projects/{project_id}/rulesets/{ruleset_id}`</summary>
                [Google.Apis.Util.RequestParameterAttribute("name", Google.Apis.Util.RequestParameterType.Path)]
                public virtual string Name { get; private set; }


                ///<summary>Gets the method name.</summary>
                public override string MethodName
                {
                    get { return "delete"; }
                }

                ///<summary>Gets the HTTP method.</summary>
                public override string HttpMethod
                {
                    get { return "DELETE"; }
                }

                ///<summary>Gets the REST path.</summary>
                public override string RestPath
                {
                    get { return "v1/{+name}"; }
                }

                /// <summary>Initializes Delete parameter list.</summary>
                protected override void InitParameters()
                {
                    base.InitParameters();

                    RequestParameters.Add(
                        "name", new Google.Apis.Discovery.Parameter
                        {
                            Name = "name",
                            IsRequired = true,
                            ParameterType = "path",
                            DefaultValue = null,
                            Pattern = @"^projects/[^/]+/rulesets/[^/]+$",
                        });
                }

            }

            /// <summary>Get a `Ruleset` by name including the full `Source` contents.</summary>
            /// <param name="name">Resource name for the ruleset to get.
            ///
            /// Format: `projects/{project_id}/rulesets/{ruleset_id}`</param>
            public virtual GetRequest Get(string name)
            {
                return new GetRequest(service, name);
            }

            /// <summary>Get a `Ruleset` by name including the full `Source` contents.</summary>
            public class GetRequest : FirebaseRulesBaseServiceRequest<Google.Apis.FirebaseRules.v1.Data.Ruleset>
            {
                /// <summary>Constructs a new Get request.</summary>
                public GetRequest(Google.Apis.Services.IClientService service, string name)
                    : base(service)
                {
                    Name = name;
                    InitParameters();
                }


                /// <summary>Resource name for the ruleset to get.
                ///
                /// Format: `projects/{project_id}/rulesets/{ruleset_id}`</summary>
                [Google.Apis.Util.RequestParameterAttribute("name", Google.Apis.Util.RequestParameterType.Path)]
                public virtual string Name { get; private set; }


                ///<summary>Gets the method name.</summary>
                public override string MethodName
                {
                    get { return "get"; }
                }

                ///<summary>Gets the HTTP method.</summary>
                public override string HttpMethod
                {
                    get { return "GET"; }
                }

                ///<summary>Gets the REST path.</summary>
                public override string RestPath
                {
                    get { return "v1/{+name}"; }
                }

                /// <summary>Initializes Get parameter list.</summary>
                protected override void InitParameters()
                {
                    base.InitParameters();

                    RequestParameters.Add(
                        "name", new Google.Apis.Discovery.Parameter
                        {
                            Name = "name",
                            IsRequired = true,
                            ParameterType = "path",
                            DefaultValue = null,
                            Pattern = @"^projects/[^/]+/rulesets/[^/]+$",
                        });
                }

            }

            /// <summary>List `Ruleset` metadata only and optionally filter the results by `Ruleset` name.
            ///
            /// The full `Source` contents of a `Ruleset` may be retrieved with GetRuleset.</summary>
            /// <param name="name">Resource name for the project.
            ///
            /// Format: `projects/{project_id}`</param>
            public virtual ListRequest List(string name)
            {
                return new ListRequest(service, name);
            }

            /// <summary>List `Ruleset` metadata only and optionally filter the results by `Ruleset` name.
            ///
            /// The full `Source` contents of a `Ruleset` may be retrieved with GetRuleset.</summary>
            public class ListRequest : FirebaseRulesBaseServiceRequest<Google.Apis.FirebaseRules.v1.Data.ListRulesetsResponse>
            {
                /// <summary>Constructs a new List request.</summary>
                public ListRequest(Google.Apis.Services.IClientService service, string name)
                    : base(service)
                {
                    Name = name;
                    InitParameters();
                }


                /// <summary>Resource name for the project.
                ///
                /// Format: `projects/{project_id}`</summary>
                [Google.Apis.Util.RequestParameterAttribute("name", Google.Apis.Util.RequestParameterType.Path)]
                public virtual string Name { get; private set; }

                /// <summary>Next page token for loading the next batch of `Ruleset` instances.</summary>
                [Google.Apis.Util.RequestParameterAttribute("pageToken", Google.Apis.Util.RequestParameterType.Query)]
                public virtual string PageToken { get; set; }

                /// <summary>Page size to load. Maximum of 100. Defaults to 10. Note: `page_size` is just a hint and the
                /// service may choose to load less than `page_size` due to the size of the output. To traverse all of
                /// the releases, caller should iterate until the `page_token` is empty.</summary>
                [Google.Apis.Util.RequestParameterAttribute("pageSize", Google.Apis.Util.RequestParameterType.Query)]
                public virtual System.Nullable<int> PageSize { get; set; }

                /// <summary>`Ruleset` filter. The list method supports filters with restrictions on `Ruleset.name`.
                ///
                /// Filters on `Ruleset.create_time` should use the `date` function which parses strings that conform to
                /// the RFC 3339 date/time specifications.
                ///
                /// Example: `create_time > date("2017-01-01") AND name=UUID-*`</summary>
                [Google.Apis.Util.RequestParameterAttribute("filter", Google.Apis.Util.RequestParameterType.Query)]
                public virtual string Filter { get; set; }


                ///<summary>Gets the method name.</summary>
                public override string MethodName
                {
                    get { return "list"; }
                }

                ///<summary>Gets the HTTP method.</summary>
                public override string HttpMethod
                {
                    get { return "GET"; }
                }

                ///<summary>Gets the REST path.</summary>
                public override string RestPath
                {
                    get { return "v1/{+name}/rulesets"; }
                }

                /// <summary>Initializes List parameter list.</summary>
                protected override void InitParameters()
                {
                    base.InitParameters();

                    RequestParameters.Add(
                        "name", new Google.Apis.Discovery.Parameter
                        {
                            Name = "name",
                            IsRequired = true,
                            ParameterType = "path",
                            DefaultValue = null,
                            Pattern = @"^projects/[^/]+$",
                        });
                    RequestParameters.Add(
                        "pageToken", new Google.Apis.Discovery.Parameter
                        {
                            Name = "pageToken",
                            IsRequired = false,
                            ParameterType = "query",
                            DefaultValue = null,
                            Pattern = null,
                        });
                    RequestParameters.Add(
                        "pageSize", new Google.Apis.Discovery.Parameter
                        {
                            Name = "pageSize",
                            IsRequired = false,
                            ParameterType = "query",
                            DefaultValue = null,
                            Pattern = null,
                        });
                    RequestParameters.Add(
                        "filter", new Google.Apis.Discovery.Parameter
                        {
                            Name = "filter",
                            IsRequired = false,
                            ParameterType = "query",
                            DefaultValue = null,
                            Pattern = null,
                        });
                }

            }
        }

        /// <summary>Test `Source` for syntactic and semantic correctness. Issues present, if any, will be returned to
        /// the caller with a description, severity, and source location.
        ///
        /// The test method may be executed with `Source` or a `Ruleset` name. Passing `Source` is useful for unit
        /// testing new rules. Passing a `Ruleset` name is useful for regression testing an existing rule.
        ///
        /// The following is an example of `Source` that permits users to upload images to a bucket bearing their user
        /// id and matching the correct metadata:
        ///
        /// _*Example*_
        ///
        /// // Users are allowed to subscribe and unsubscribe to the blog. service firebase.storage { match
        /// /users/{userId}/images/{imageName} { allow write: if userId == request.auth.uid &&
        /// (imageName.matches('*.png$') || imageName.matches('*.jpg$')) && resource.mimeType.matches('^image/') }
        /// }</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="name">Tests may either provide `source` or a `Ruleset` resource name.
        ///
        /// For tests against `source`, the resource name must refer to the project: Format: `projects/{project_id}`
        ///
        /// For tests against a `Ruleset`, this must be the `Ruleset` resource name: Format:
        /// `projects/{project_id}/rulesets/{ruleset_id}`</param>
        public virtual TestRequest Test(Google.Apis.FirebaseRules.v1.Data.TestRulesetRequest body, string name)
        {
            return new TestRequest(service, body, name);
        }

        /// <summary>Test `Source` for syntactic and semantic correctness. Issues present, if any, will be returned to
        /// the caller with a description, severity, and source location.
        ///
        /// The test method may be executed with `Source` or a `Ruleset` name. Passing `Source` is useful for unit
        /// testing new rules. Passing a `Ruleset` name is useful for regression testing an existing rule.
        ///
        /// The following is an example of `Source` that permits users to upload images to a bucket bearing their user
        /// id and matching the correct metadata:
        ///
        /// _*Example*_
        ///
        /// // Users are allowed to subscribe and unsubscribe to the blog. service firebase.storage { match
        /// /users/{userId}/images/{imageName} { allow write: if userId == request.auth.uid &&
        /// (imageName.matches('*.png$') || imageName.matches('*.jpg$')) && resource.mimeType.matches('^image/') }
        /// }</summary>
        public class TestRequest : FirebaseRulesBaseServiceRequest<Google.Apis.FirebaseRules.v1.Data.TestRulesetResponse>
        {
            /// <summary>Constructs a new Test request.</summary>
            public TestRequest(Google.Apis.Services.IClientService service, Google.Apis.FirebaseRules.v1.Data.TestRulesetRequest body, string name)
                : base(service)
            {
                Name = name;
                Body = body;
                InitParameters();
            }


            /// <summary>Tests may either provide `source` or a `Ruleset` resource name.
            ///
            /// For tests against `source`, the resource name must refer to the project: Format: `projects/{project_id}`
            ///
            /// For tests against a `Ruleset`, this must be the `Ruleset` resource name: Format:
            /// `projects/{project_id}/rulesets/{ruleset_id}`</summary>
            [Google.Apis.Util.RequestParameterAttribute("name", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Name { get; private set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.FirebaseRules.v1.Data.TestRulesetRequest Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "test"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "v1/{+name}:test"; }
            }

            /// <summary>Initializes Test parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "name", new Google.Apis.Discovery.Parameter
                    {
                        Name = "name",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = @"^projects/.+$",
                    });
            }

        }
    }
}

namespace Google.Apis.FirebaseRules.v1.Data
{    

    /// <summary>A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A
    /// typical example is to use it as the request or the response type of an API method. For instance:
    ///
    /// service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
    ///
    /// The JSON representation for `Empty` is empty JSON object `{}`.</summary>
    public class Empty : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>`File` containing source content.</summary>
    public class File : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Textual Content.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("content")]
        public virtual string Content { get; set; } 

        /// <summary>Fingerprint (e.g. github sha) associated with the `File`.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("fingerprint")]
        public virtual string Fingerprint { get; set; } 

        /// <summary>File name.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("name")]
        public virtual string Name { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Represents a service-defined function call that was invoked during test execution.</summary>
    public class FunctionCall : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The arguments that were provided to the function.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("args")]
        public virtual System.Collections.Generic.IList<object> Args { get; set; } 

        /// <summary>Name of the function invoked.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("function")]
        public virtual string Function { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Issues include warnings, errors, and deprecation notices.</summary>
    public class Issue : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Short error description.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("description")]
        public virtual string Description { get; set; } 

        /// <summary>The severity of the issue.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("severity")]
        public virtual string Severity { get; set; } 

        /// <summary>Position of the issue in the `Source`.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("sourcePosition")]
        public virtual SourcePosition SourcePosition { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>The response for FirebaseRulesService.ListReleases.</summary>
    public class ListReleasesResponse : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The pagination token to retrieve the next page of results. If the value is empty, no further
        /// results remain.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("nextPageToken")]
        public virtual string NextPageToken { get; set; } 

        /// <summary>List of `Release` instances.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("releases")]
        public virtual System.Collections.Generic.IList<Release> Releases { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>The response for FirebaseRulesService.ListRulesets.</summary>
    public class ListRulesetsResponse : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The pagination token to retrieve the next page of results. If the value is empty, no further
        /// results remain.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("nextPageToken")]
        public virtual string NextPageToken { get; set; } 

        /// <summary>List of `Ruleset` instances.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("rulesets")]
        public virtual System.Collections.Generic.IList<Ruleset> Rulesets { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>`Release` is a named reference to a `Ruleset`. Once a `Release` refers to a `Ruleset`, rules-enabled
    /// services will be able to enforce the `Ruleset`.</summary>
    public class Release : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Time the release was created. Output only.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("createTime")]
        public virtual object CreateTime { get; set; } 

        /// <summary>Resource name for the `Release`.
        ///
        /// `Release` names may be structured `app1/prod/v2` or flat `app1_prod_v2` which affords developers a great
        /// deal of flexibility in mapping the name to the style that best fits their existing development practices.
        /// For example, a name could refer to an environment, an app, a version, or some combination of three.
        ///
        /// In the table below, for the project name `projects/foo`, the following relative release paths show how flat
        /// and structured names might be chosen to match a desired development / deployment strategy.
        ///
        /// Use Case     | Flat Name           | Structured Name -------------|---------------------|----------------
        /// Environments | releases/qa         | releases/qa Apps         | releases/app1_qa    | releases/app1/qa
        /// Versions     | releases/app1_v2_qa | releases/app1/v2/qa
        ///
        /// The delimiter between the release name path elements can be almost anything and it should work equally well
        /// with the release name list filter, but in many ways the structured paths provide a clearer picture of the
        /// relationship between `Release` instances.
        ///
        /// Format: `projects/{project_id}/releases/{release_id}`</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("name")]
        public virtual string Name { get; set; } 

        /// <summary>Name of the `Ruleset` referred to by this `Release`. The `Ruleset` must exist the `Release` to be
        /// created.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("rulesetName")]
        public virtual string RulesetName { get; set; } 

        /// <summary>Time the release was updated. Output only.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("updateTime")]
        public virtual object UpdateTime { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>`Ruleset` is an immutable copy of `Source` with a globally unique identifier and a creation
    /// time.</summary>
    public class Ruleset : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Time the `Ruleset` was created. Output only.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("createTime")]
        public virtual object CreateTime { get; set; } 

        /// <summary>Name of the `Ruleset`. The ruleset_id is auto generated by the service. Format:
        /// `projects/{project_id}/rulesets/{ruleset_id}` Output only.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("name")]
        public virtual string Name { get; set; } 

        /// <summary>`Source` for the `Ruleset`.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("source")]
        public virtual Source Source { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>`Source` is one or more `File` messages comprising a logical set of rules.</summary>
    public class Source : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>`File` set constituting the `Source` bundle.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("files")]
        public virtual System.Collections.Generic.IList<File> Files { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Position in the `Source` content including its line, column number, and an index of the `File` in the
    /// `Source` message. Used for debug purposes.</summary>
    public class SourcePosition : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>First column on the source line associated with the source fragment.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("column")]
        public virtual System.Nullable<int> Column { get; set; } 

        /// <summary>Name of the `File`.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("fileName")]
        public virtual string FileName { get; set; } 

        /// <summary>Line number of the source fragment. 1-based.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("line")]
        public virtual System.Nullable<int> Line { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Test result message containing the state of the test as well as a description and source position for
    /// test failures.</summary>
    public class TestResult : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Debug messages related to test execution issues encountered during evaluation.
        ///
        /// Debug messages may be related to too many or too few invocations of function mocks or to runtime errors that
        /// occur during evaluation.
        ///
        /// For example: ```Unable to read variable [name: "resource"]```</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("debugMessages")]
        public virtual System.Collections.Generic.IList<string> DebugMessages { get; set; } 

        /// <summary>Position in the `Source` or `Ruleset` where the principle runtime error occurs.
        ///
        /// Evaluation of an expression may result in an error. Rules are deny by default, so a `DENY` expectation when
        /// an error is generated is valid. When there is a `DENY` with an error, the `SourcePosition` is returned.
        ///
        /// E.g. `error_position { line: 19 column: 37 }`</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("errorPosition")]
        public virtual SourcePosition ErrorPosition { get; set; } 

        /// <summary>The set of function calls made to service-defined methods.
        ///
        /// Function calls are included in the order in which they are encountered during evaluation, are provided for
        /// both mocked and unmocked functions, and included on the response regardless of the test `state`.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("functionCalls")]
        public virtual System.Collections.Generic.IList<FunctionCall> FunctionCalls { get; set; } 

        /// <summary>State of the test.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("state")]
        public virtual string State { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>The request for FirebaseRulesService.TestRuleset.</summary>
    public class TestRulesetRequest : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Optional `Source` to be checked for correctness.
        ///
        /// This field must not be set when the resource name refers to a `Ruleset`.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("source")]
        public virtual Source Source { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>The response for FirebaseRulesService.TestRuleset.</summary>
    public class TestRulesetResponse : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Syntactic and semantic `Source` issues of varying severity. Issues of `ERROR` severity will prevent
        /// tests from executing.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("issues")]
        public virtual System.Collections.Generic.IList<Issue> Issues { get; set; } 

        /// <summary>The set of test results given the test cases in the `TestSuite`. The results will appear in the
        /// same order as the test cases appear in the `TestSuite`.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("testResults")]
        public virtual System.Collections.Generic.IList<TestResult> TestResults { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }
}
